/*
 * BinaryExpressionDescription.java
 * 
 * last update: 15.01.2010 by Stefan Saru
 * 
 * author:	?
 *
 * Obs:  
 */

package engine;


class BinaryExpressionDescription implements ExpressionDescription{

	ExpressionDescription left, right;
	String op;

	BinaryExpressionDescription(ExpressionDescription l, String op, ExpressionDescription r){
		left = l;
		this.op = op;
		right = r;
	}

	public Expression instantiate(NameSpace n)throws ParseException{
		return new BinaryExpression(n, left.instantiate(n), op, right.instantiate(n));
	}

	public String toString(){
		return left + " " + op + " " + right;
	}

	public boolean isLeftValue(){
		return false;
	}
}

